home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / util3 / verbes.lha / Install_Verbes next >
Text File  |  1996-01-29  |  5KB  |  266 lines

  1. ; Installer script for Ensemble Verbes (unregistered)
  2. ; $VER: Install_Verbes 1.8 (30.1.96)
  3. ; Changes from V1.7
  4. ;    Installs Swedish catalog file
  5. ; Changes from V1.6
  6. ;    Installs new catalog file
  7. ; Changes from V1.5
  8. ;    Removed some commented debugging code
  9. ;    Installs new catalog files
  10. ; Changes from V1.4
  11. ;    Installs catalog files
  12. ; Changes from V1.3
  13. ;    Separated shareware install script from registered one
  14. ;        (mostly removed code to install AmigaGuide and
  15. ;        amigaguide.library)
  16. ; Changes from V1.2
  17. ;    Installs separate .guide files for V37, V39+
  18. ; Changes from V1.1
  19. ;    Removed "force user level" code--now uses MINUSER tooltype
  20. ;    Started on installation of separate .guide files for V37, V39+
  21. ; Changes from V1.0
  22. ;    Fixed explicit reference to "Programs:"
  23.  
  24. ;=============================================================================
  25. ; procedure to copy the language drivers and catalogs (from V39 Install)
  26.  
  27. (procedure DOLOCALE
  28. (
  29.     (set n 0)
  30.     (while
  31.         (set language
  32.             (select n ;"dansk"
  33.                   ;"deutsch"
  34.                   "english"
  35.                   "español"
  36.                   "français"
  37.                   "italiano"
  38.                   ;"nederlands"
  39.                   "norsk"
  40.                   ;"português"
  41.                   "svenska"
  42.                   ""
  43.             )
  44.         )
  45.         (
  46.             (set catpath
  47.                 (tackon "Catalogs" language)
  48.             )
  49.             (if (in lang n)
  50.                 (
  51.                     (if (<> 0 n) ; skip "english"
  52.                         (
  53.                             (makedir
  54.                                 (tackon newdest "Catalogs")
  55.                                 (safe)
  56.                             )
  57.                             (makedir
  58.                                 (tackon newdest catpath)
  59.                                 (safe)
  60.                             )
  61.                             (if (= 2 n) ; handle 2 cases for français
  62.                                 (
  63.                                     (set langopt
  64.                                         (askbool
  65.                                             (prompt "Choose the desired version of the français catalog file")
  66.                                             (choices "French with English" "French only")
  67.                                             (help "You may choose either:\n"
  68.                                                   "  French with English menus and error messages, or\n"
  69.                                                   "  Entirely French"
  70.                                             )
  71.                                         )
  72.                                     )
  73.                                     (if (= 1 langopt) ; French with English
  74.                                         (set srcpath
  75.                                             (tackon "Catalogs" "français2")
  76.                                         )
  77.                                     )
  78.                                 )
  79.                             )
  80.                             (copyfiles
  81.                                 (source
  82.                                     (tackon @execute-dir catpath)
  83.                                 )
  84.                                 (dest
  85.                                     (tackon newdest catpath)
  86.                                 )
  87.                                 (all)
  88.                             )
  89.                         )
  90.                     )
  91.                 )
  92.             )
  93.             (set n (+ n 1))
  94.         )
  95.     )
  96. ))
  97.  
  98. ; Find OS version number
  99. (set osver
  100.     (/
  101.         (getversion "exec.library"
  102.             (resident)
  103.         )
  104.         65536
  105.     )
  106. )
  107.  
  108. ; Is user running 3.0 or above?
  109. (set ks3
  110.     (> osver 38)
  111. )
  112.  
  113. ; Is user running 2.0 or above?  If not, Verbes won't work, so abort.
  114. (if
  115.     (< osver 37)
  116.     (
  117.         (message "Ensemble Verbes requires Release 2 or higher.  "
  118.                  "Exiting..."
  119.         )
  120.         (transcript "Error: Ensemble Verbes requires Release 2 or higher.")
  121.         (exit
  122.             (quiet)
  123.         )
  124.     )
  125.     (if ks3
  126.         (message "Installing for Release 3 and above")
  127.         (message "Installing for Release 2.x")
  128.     )
  129. )
  130.  
  131. ; Is Verbes there?  If not, user is not running from the Verbes dir,
  132. ; so abort.
  133. (if
  134.     (not
  135.         (exists
  136.             (tackon @execute-dir "Verbes")
  137.         )
  138.     )
  139.     (
  140.         (message "Please run the installation program from the "
  141.                  "Ensemble Verbes directory.  Exiting..."
  142.         )
  143.         (transcript "Error: Installer must be run from the directory "
  144.                     "containing the Ensemble Verbes installation script.")
  145.         (exit
  146.             (quiet)
  147.         )
  148.     )
  149. )
  150.  
  151. (set vernum
  152.     (getversion "Verbes")
  153. )
  154. (set thisver
  155.     (/ vernum 65536)
  156. )
  157. (set thisrev
  158.     (- vernum
  159.         (* thisver 65536)
  160.     )
  161. )
  162.  
  163. (set newdest
  164.     (askdir
  165.         (prompt "Choose a location for \"Ensemble Verbes\"")
  166.         (help @askdir-help)
  167.         (default @default-dest)
  168.         (newpath)
  169.     )
  170. )
  171.  
  172. (set @default-dest newdest)
  173.  
  174. (set vernum
  175.     (getversion
  176.         (tackon newdest "Verbes")
  177.     )
  178. )
  179. (set ver
  180.     (/ vernum 65536)
  181. )
  182. (set rev
  183.     (- vernum
  184.         (* ver 65536)
  185.     )
  186. )
  187.  
  188. (if
  189.     (or
  190.         (> thisver ver)
  191.         (and
  192.             (= thisver ver)
  193.             (> thisrev rev)
  194.         )
  195.     )
  196.     (
  197.         (if
  198.             (> thisver 0)
  199.             (
  200.                 (transcript "Replacing \"Ensemble Verbes\" V" ver "." rev " with V" thisver "." thisrev)
  201.             )
  202.         )
  203.         (copyfiles
  204.             (prompt
  205.                 (cat "About to install \"Ensemble Verbes\" V" thisver "." thisrev " in " newdest)
  206.             )
  207.             (help @copyfiles-help)
  208.             (source
  209.                 (tackon @execute-dir "Verbes")
  210.             )
  211.             (dest newdest)
  212.             (infos)
  213.         )
  214.         (tooltype
  215.             (dest
  216.                 (tackon newdest "Verbes")
  217.             )
  218.             (noposition)
  219.         )
  220.         (set lang
  221.             (askoptions
  222.                 (prompt "Which languages should be installed?")
  223.                 (help "Language help")
  224.                 (choices "English" "Español" "Français" "Italiano" "Norsk" "Svenska")
  225.                 (default 63)
  226.             )
  227.         )
  228.         (DOLOCALE)
  229.         (copyfiles
  230.             (prompt
  231.                 (cat "About to install \"Verbes.guide\" in " newdest)
  232.             )
  233.             (help @copyfiles-help)
  234.             (source
  235.                 (tackon @execute-dir "Verbes.guide")
  236.             )
  237.             (dest newdest)
  238.             (newname "Verbes.guide")
  239.             (infos)
  240.         )
  241.  
  242.         ; Set Verbes.guide.info's default tool to "AmigaGuide" for <3.0 systems;
  243.         ; "MultiView" for >=3.0
  244.         (if ks3
  245.             (
  246.                 (tooltype
  247.                     (dest
  248.                         (tackon newdest "Verbes.guide")
  249.                     )
  250.                     (noposition)
  251.                     (setdefaulttool "MultiView")
  252.                 )
  253.             )
  254.             (
  255.                 (tooltype
  256.                     (dest
  257.                         (tackon newdest "Verbes.guide")
  258.                     )
  259.                     (noposition)
  260.                     (setdefaulttool "AmigaGuide")
  261.                 )
  262.             )
  263.         )
  264.     )
  265. )
  266.